package com.jiantong.news.impl.dao;

import com.jiantong.news.model.News;
import io.terminus.common.mysql.dao.MyBatisDao;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 首页\新闻
 * Created by mz03 on 2017/3/15.
 *zyp
 */
@Repository
public class NewsDao extends MyBatisDao<News> {
    //添加一个根据type字段查询数据集的方法
    public List<News> findByType(Integer type){
        return getSqlSession().selectList(sqlId("findByType"),type);
    }

}
